package com.pine.sunshineelder.checkin.vo.elder;

import java.time.LocalDate;

import com.pine.sunshineelder.common.entity.ElderEntity;

import lombok.Data;
@Data
public class ElderRegisterVo {
	private String id;
	private String name;
	private String account;
	private Integer male;
	private LocalDate birthday;
	private String idCard;
	private String privatePhone;
	private String address;
	private String image;
	private String createUserId;
	private String no;
	private Integer height;
	private Integer weight;
	private Integer booldType;
	private Integer marriage;
	private String medicalRecord;
	private LocalDate enterTime;
	private String remark;
	public static ElderRegisterVo of(ElderEntity ee) {
		ElderRegisterVo ev = new ElderRegisterVo();
		ev.setAddress(ee.getAddress());
		ev.setBirthday(ee.getBirthday());
		ev.setBooldType(ee.getBooldType());
		ev.setCreateUserId(ee.getCreateUserId());
		ev.setPrivatePhone(ee.getPrivatePhone());
		ev.setHeight(ee.getHeight());
		ev.setWeight(ee.getWeight());
		ev.setIdCard(ee.getIdCard());
		ev.setImage(ee.getImage());
		if(ee.isMale()) {
			ev.setMale(1);
		}else {
			ev.setMale(0);
		}	
		ev.setEnterTime(ee.getEnterTime());
		ev.setMarriage(ee.getMarriage());
		ev.setMedicalRecord(ee.getMedicalRecord());
		ev.setName(ee.getName());
		ev.setAccount(ee.getAccount());
		ev.setRemark(ee.getRemark());
		ev.setNo(ee.getNo());
		ev.setId(ee.getId());
		return ev;
		
	}

}
